<template>
	<view class="">
		<view class="top-bg"></view>
		<view class="u-p-20 page">
			<view class="user-box u-p-l-20 u-p-b-20 u-p-r-20">
				<view class="user-info u-p-l-20 u-p-t-20 u-p-r-20">
					<view class="u-flex u-row-between">
						<view class="u-flex">
							<u-image width="100rpx" height="100rpx" shape="circle" src="/static/logo.png"></u-image>
							<view class="u-p-20 u-type-primary">
								小小刀
							</view>
						</view>
						<view class="u-flex">
							<u-icon name="scan" class='u-m-r-20' color="#2979ff" size="40"></u-icon>
							<u-image width="60rpx" height="60rpx" shape="circle" src="/static/icon/qr.png"></u-image>
						</view>
					</view>
					<u-grid :col="3" :border='false'>
						<u-grid-item>
							<view class="">
								3
							</view>
							<view class="u-type-info-dark">
								优惠券
							</view>
						</u-grid-item>
						<u-grid-item>
							<view class="">
								100.00
							</view>
							<view class="u-type-info-dark">
								我的账户
							</view>
						</u-grid-item>
						<u-grid-item>
							<view class="">
								3
							</view>
							<view class="u-type-info-dark">
								电子券
							</view>
						</u-grid-item>
					</u-grid>
				</view>
			</view>
			<u-gap height="165"></u-gap>
			<view class="box">
				<view class="u-p-20 u-border-bottom">
					我的订单
				</view>
				<u-grid :col="4" :border='false'>
					<u-grid-item>
						<u-icon name="tags" :size="46" color="#0eb6ff"></u-icon>
						<view class="u-type-info-dark">待付款</view>
					</u-grid-item>
					<u-grid-item>
						<u-badge count="9" :offset="[20, 20]"></u-badge>
						<u-icon name="car" :size="46" color="#0eb6ff"></u-icon>
						<view class="u-type-info-dark">代发货</view>
					</u-grid-item>
					<u-grid-item>
						<u-icon name="email" :size="46" color="#0eb6ff"></u-icon>
						<view class="u-type-info-dark">待收货</view>
					</u-grid-item>
					<u-grid-item>
						<u-icon name="thumb-up" :size="46" color="#0eb6ff"></u-icon>
						<view class="u-type-info-dark">待评价</view>
					</u-grid-item>
				</u-grid>
			</view>
			<u-gap height="20"></u-gap>
			<view class="box">
				<view class="u-p-20 u-border-bottom">
					常用工具
				</view>
				<u-grid :col="4" :border='false'>
					<u-grid-item>
						<u-icon name="coupon-fill" :size="46" color="#ce5f41"></u-icon>
						<view class="u-type-info-dark">开发票</view>
					</u-grid-item>
					<u-grid-item>
						<u-icon name="star-fill" :size="46" color="#ffe38f"></u-icon>
						<view class="u-type-info-dark">收藏内容</view>
					</u-grid-item>
				</u-grid>
			</view>
			<u-gap height="20"></u-gap>
			<u-divider color="#0eb6ff" height='60' class='u-m-b-10' bg-color="#f5f5f5">推荐</u-divider>
			<view class="u-m-t-20 u-flex u-flex-wrap u-row-between">
				<index-list-item v-for="(item,index) in recommendList" :key='index' class="u-m-b-20 recommend-item" vertical :item='item'></index-list-item>
			</view>
			<u-loadmore :status="status" />
		</view>
	</view>
</template>

<script>
	import {
		goodsList
	} from '@/common/data/data.js'
	export default {
		data() {
			return {
				show: false,
				status: 'loadmore',
				recommendList: [],
			};
		},
		onNavigationBarButtonTap(e) {
			console.log(e.index)
			switch (e.index) {
				case 0:
					this.$toast('点击了设置')
					break;
				default:
					this.$toast('点击了客服')
					break;
			}
		},
		onLoad() {
			this.recommendList = goodsList
		},
		methods: {

		},
	}
</script>

<style scoped lang="scss">
	page {
		background-color: #F5F5F5;
	}

	.box {
		background-color: #FFFFFF;
	}

	.user-box {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
	}

	.user-info {
		background-color: #FFFFFF;
		z-index: 333;
		border-radius: 8rpx;
		border-bottom: 10rpx solid #0eb6ff;
		box-shadow: 0 0 15rpx #cacaca;
	}

	.top-bg {
		background-color: #0eb6ff;
		height: 100rpx;
	}

	.page {
		background-color: #F5F5F5;
	}

	.recommend-item {
		width: 48%;
	}
</style>
